from iptcinfo import IPTCInfo
import commands
from types import ListType, UnicodeType, StringType
import os
import re
import pdb
import pickle
from collections import defaultdict
from stats import Stats

s = Stats()
s.basics()
print(str(s.ttlimgs)+" found, of which "+str(int(s.ttlimgs)-int(s.untgd))+" tagged.") 
i=1
for tup in s.popu:
    print(str(i)+"."+str(tup[0])+":"+str(tup[1]))
    i +=1
    if i is 15: break

print("number of completely tagless images:"+str([key for key in s.fdict.keys() if s.fdict[key] is []].__len__()))
